package org.example;

import com.common.HttpRequestUtil;
import com.google.gson.Gson;

import java.util.HashMap;
import java.util.Map;

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
        cyTest();


    }

    public static void cyTest() {
        Map<String, String> paramMap = new HashMap();

        paramMap.put("ActionName", "LoadBizObject");

        paramMap.put("SchemaCode", "D279357Sl2ixcptcdsjg34x8gkw2pg0l4");

        paramMap.put("BizObjectId", "Aac3c2eedcbfc43c3b97cf580e44cf6fe");


//身份认证参数

        Map headers = new HashMap();

        headers.put("EngineCode", "iskos7m6c2f9gp0wqcn7iel66");

        headers.put("EngineSecret", "BFqZ8M35luiHgg3vwd46rytkkQP38s2LJWro0EG3oLfyiKKIUi6XGg==");


        Gson gson = new Gson();
        String url = "https://www.h3yun.com/OpenApi/Invoke";

        String result = null;
        try {
            result = HttpRequestUtil.sendPost(url, gson.toJson(paramMap), headers);
            System.out.println(result);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }
}